package com.itchen.service.impl;

import com.itchen.dao.BookDao;
import com.itchen.service.BookService;
import org.springframework.stereotype.Component;

/**
 * @author げっしょく
 * @date 2021/9/7
 */
@Component
public class BookServiceImpl implements BookService {
    private BookDao bookDao;

//    这是setter注入的方法
//    public void setBookDao(BookDao bookDao) {
//        this.bookDao = bookDao;
//    }

    public BookServiceImpl(BookDao bookDao) {
        this.bookDao = bookDao;
    }

    public void save() {
        System.out.println("bookService  save...");

        bookDao.save();

    }
}
